home *** CD-ROM | disk | FTP | other *** search
/ Programming an RTS Game with Direct3D / Programming an RTS Game with Direct3D.iso / Examples / Chapter 14 / Example 14.1 / MasterAI.h < prev    next >
Encoding:
C/C++ Source or Header  |  2006-06-30  |  834 b   |  45 lines

  1. #ifndef _RTS_MASTERAI_
  2. #define _RTS_MASTERAI_
  3.  
  4. #include <vector>
  5. #include <stack>
  6. #include <set>
  7.  
  8. #include "GroupAI.h"
  9. #include "player.h"
  10. #include "action.h"
  11.  
  12. class STRATEGY_MAP;
  13.  
  14. class MASTERAI
  15. {
  16.     friend class GROUPAI;
  17.     friend class APPLICATION;
  18.     friend class SMALL_ATTACK;
  19.     public:
  20.         MASTERAI(PLAYER *_player, TERRAIN *_terrain);
  21.         ~MASTERAI();
  22.         
  23.         void Update(float deltaTime);
  24.         void HandleGroups();
  25.         void MasterAI();
  26.  
  27.         void BuildManager();
  28.         void StrategicManager();
  29.  
  30.         void EnemiesSpotted(std::vector<MAPOBJECT*> &manyEnemies);
  31.  
  32.     private:
  33.         PLAYER *m_pPlayer;
  34.         TERRAIN *m_pTerrain;
  35.         STRATEGY_MAP *m_pStrategyMap;
  36.  
  37.         GROUPAI m_unitPool;
  38.         std::vector<GROUPAI*> m_groups;
  39.         std::set<MAPOBJECT*> m_visibleEnemies;
  40.  
  41.         float m_nextGroupUpdate, m_nextUpdate;
  42.         RECT m_base;
  43. };
  44.  
  45. #endif